package model

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ ShortPoetryModel = (*customShortPoetryModel)(nil)

type (
	// ShortPoetryModel is an interface to be customized, add more methods here,
	// and implement the added methods in customShortPoetryModel.
	ShortPoetryModel interface {
		shortPoetryModel
		withSession(session sqlx.Session) ShortPoetryModel
	}

	customShortPoetryModel struct {
		*defaultShortPoetryModel
	}
)

// NewShortPoetryModel returns a model for the database table.
func NewShortPoetryModel(conn sqlx.SqlConn) ShortPoetryModel {
	return &customShortPoetryModel{
		defaultShortPoetryModel: newShortPoetryModel(conn),
	}
}

func (m *customShortPoetryModel) withSession(session sqlx.Session) ShortPoetryModel {
	return NewShortPoetryModel(sqlx.NewSqlConnFromSession(session))
}
